Generalize PV names#29
Draft
Max Rakitin (mrakitin) wants to merge 3 commits into
Draft
Conversation
Replace 8 hardware-specific PV attributes (enc1/enc2/enc3/zebra_time, i0/im/it/sis_time) with 4 generic channels (ch1-ch4) shared across both dev types. The dev_type PV already distinguishes zebra vs scaler, so one set of 4 generic channels is sufficient. HDF5 dataset name *values* in _DEFAULT_DATASET_MAPS are unchanged: - zebra: ch1->enc1, ch2->enc2, ch3->enc3, ch4->zebra_time - scaler: ch1->i0, ch2->im, ch3->it, ch4->sis_time This enables reuse across beamlines (e.g. FXI, issue #27) via partial --dataset-map overrides such as: --dataset-map '{"ch1": "enc1_pi_r", "ch2": "zebra_time"}' Changes: - caproto_ioc.py: replace 8 pvproperties with ch1-ch4, update default maps and CLI help text - ophyd.py: replace 8 Cpt components with ch1-ch4 - tests/conftest.py: update custom_map fixture keys to ch1-ch4 Closes #27 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a test verifying that a partial --dataset-map with only 2 channels (FXI use case from issue #27) produces an HDF5 file with exactly those 2 datasets and no others. New fixtures: - zebra_caproto_ioc_fxi_map: IOC started with --dataset-map='{"ch1": "enc1_pi_r", "ch2": "zebra_time"}' - zebra_ophyd_device_fxi_map: ophyd device pointing at ZEBRA_FXI prefix New test: - test_zebra_fxi_partial_dataset_map: stages, acquires, and checks that the resulting HDF5 contains exactly {"enc1_pi_r", "zebra_time"} — no more, no less. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a test that runs three ZebraSaveIOC instances simultaneously and
verifies each produces an HDF5 file with exactly the expected datasets:
- SRX Zebra (default map): enc1, enc2, enc3, zebra_time
- SRX SIS (scaler map): i0, im, it, sis_time
- FXI (partial 2-ch): enc1_pi_r, zebra_time
Each IOC is started with a distinct PV prefix so they run independently
in the same session. Stage, acquire, and unstage calls are initiated for
all three before waiting, exercising concurrent operation.
New session fixtures:
- zebra_caproto_ioc_conc_srx_zebra (ZEBRA_CONC_SRXZ prefix)
- zebra_caproto_ioc_conc_srx_sis (ZEBRA_CONC_SRXS prefix, explicit
scaler dataset-map)
New function fixtures:
- zebra_ophyd_device_conc_srx_zebra
- zebra_ophyd_device_conc_srx_sis
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up PR to #28 to make the PV names more generic.
I suggest we merge #28 first and cut a release, and then will rebase/merge this PR and create a next release with backward-incompatible changes (with minor version bump).